/*     */ package eos.moe.dragoncore;
/*     */ 
/*     */ import java.text.DecimalFormat;
/*     */ import java.util.Arrays;
/*     */ import java.util.Collection;
/*     */ import java.util.List;
/*     */ import java.util.function.Function;
/*     */ import java.util.stream.Collectors;
/*     */ import net.minecraft.util.text.ITextComponent;
/*     */ import net.minecraft.util.text.TextComponentString;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class yl
/*     */ {
/*     */   @eos/moe/dragoncore/t(v = {"合并文本", "String_Concat"})
/*     */   public static String z(String... a) {
/*  23 */     return String.join("", (CharSequence[])a);
/*     */   }
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"合并加入文本", "String_Join"})
/*     */   public static String v(String... a) {
/*  28 */     return String.join("", (CharSequence[])a);
/*     */   }
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"取文本宽度", "String_Get_Width"})
/*     */   public static int v(o a, String str, boolean bool) {
/*  33 */     int i = 0;
/*     */     
/*  35 */     if (a instanceof nf) {
/*  36 */       nf nf = (nf)a;
/*  37 */       for (o o1 : nf.v()) {
/*  38 */         i = Math.max(v(o1.z(), str, bool), i);
/*     */       }
/*     */     } else {
/*  41 */       i = Math.max(v(a.z(), str, bool), i);
/*     */     } 
/*     */     
/*  44 */     return i;
/*     */   }
/*     */   
/*     */   public static int v(String a, String str1, boolean bool) {
/*  48 */     if (bool) {
/*  49 */       a = a.replace("&", "§");
/*     */     }
/*  51 */     List<String> list = sk.v(a, 0, str1);
/*  52 */     int i = 0;
/*  53 */     for (String str : list) {
/*  54 */       i = Math.max(i, af.v(str, str1, false));
/*     */     }
/*     */     
/*  57 */     return i;
/*     */   }
/*     */ 
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"取文本高度", "String_Get_Height"})
/*     */   public static int h(String a, String str1) {
/*  63 */     return sk.v(a, 0, str1).size() * 10;
/*     */   }
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"按宽度分割", "String_SplitWithWidth"})
/*     */   public static nf v(o a, String str, int i) {
/*  68 */     if (a instanceof he) {
/*  69 */       return new nf((Collection<o>)sk.v(a.v(), i, str).stream().map(he::new).collect(Collectors.toList()));
/*     */     }
/*  71 */     return new nf((Collection<o>)sk.v(a.z(), i, str).stream().map(ah::new).collect(Collectors.toList()));
/*     */   }
/*     */ 
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"取文本长度", "String_Get_Length"})
/*     */   public static int v(String a) {
/*  77 */     return a.length();
/*     */   }
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"到整数", "String_ToInt"})
/*     */   public static String v(double a) {
/*  82 */     return String.valueOf((long)a);
/*     */   }
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"截取文本", "String_SubString"})
/*     */   public static String v(String a, int i, o o1) {
/*  87 */     i = Math.min(i, a.length());
/*  88 */     int j = (o1 == null) ? a.length() : (int)o1.v();
/*  89 */     return a.substring(i, Math.min(j, a.length()));
/*     */   }
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"是否存在前缀", "有前缀", "String_HasPrefix"})
/*     */   public static boolean h(String a, String str1) {
/*  94 */     return a.startsWith(str1);
/*     */   }
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"是否存在后缀", "有后缀", "String_HasSuffix"})
/*     */   public static boolean z(String a, String str1) {
/*  99 */     return a.endsWith(str1);
/*     */   }
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"是否包含", "包含", "String_Contains"})
/*     */   public static boolean v(String a, String str1) {
/* 104 */     return a.contains(str1);
/*     */   }
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"取索引", "String_IndexOf"})
/*     */   public static int z(String a, String str1) {
/* 109 */     return a.indexOf(str1);
/*     */   }
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"倒取索引", "String_LastIndexOf"})
/*     */   public static int v(String a, String str1) {
/* 114 */     return a.lastIndexOf(str1);
/*     */   }
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"取索引文本", "String_CharAt"})
/*     */   public static String v(String a, int i) {
/* 119 */     return String.valueOf(a.charAt(i));
/*     */   }
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"替换", "String_Replace"})
/*     */   public static String h(String a, String str1, String str2) {
/* 124 */     return a.replace(str1, str2);
/*     */   }
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"替换首次", "String_ReplaceFirst"})
/*     */   public static String z(String a, String str1, String str2) {
/* 129 */     return a.replaceFirst(str1, str2);
/*     */   }
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"替换正则", "String_ReplaceAll"})
/*     */   public static String v(String a, String str1, String str2) {
/* 134 */     return a.replaceAll(str1, str2);
/*     */   }
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"去颜色", "String_StripColor"})
/*     */   public static String v(String a) {
/* 139 */     return pa.v(a);
/*     */   }
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"分割", "String_Split"})
/*     */   public static o v(String a, String str1) {
/* 144 */     return new nf(Arrays.asList((Object[])a.split(str1)), false);
/*     */   }
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"格式数字", "Decimal_Format"})
/*     */   public static String v(double a, String str) {
/* 149 */     return (new DecimalFormat(str)).format(a);
/*     */   }
/*     */   
/*     */   @eos/moe/dragoncore/t(v = {"toTellraw"})
/*     */   public static he v(String a) {
/*     */     try {
/* 155 */       ITextComponent iTextComponent = ITextComponent.Serializer.func_150699_a(a);
/* 156 */       iTextComponent = (iTextComponent == null) ? (ITextComponent)new TextComponentString("") : iTextComponent;
/* 157 */       return new he(iTextComponent);
/* 158 */     } catch (Exception exception) {
/* 159 */       return new he((ITextComponent)new TextComponentString(""));
/*     */     } 
/*     */   }
/*     */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\yl.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */